#!/usr/bin/python
'''
Colors edges in dot file.
ccomps -x graph.dot | dot | gvpack | neato -n2 -Tps -o test.ps
'''
import sys

# parameters.
dot_file = sys.argv[1]

# read in dot file.
fin = open(dot_file, "rb")
lines = fin.readlines()
fin.close()

# parse dot.
for line in lines:
	# skip non red lines.
	if line.count("red") == 0: continue
	
	# skip zero red lines.
	if line.count("red=0") > 0: continue
	
	
	# add edge color to it.
